home *** CD-ROM | disk | FTP | other *** search
/ Aminet 24 / Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso / Aminet / dev / c / cxref_1_4a.lha / cpp / README < prev    next >
Text File  |  1997-04-25  |  4KB  |  133 lines

  1.        C Cross Referencing & Documenting tool Version 1.4 - cxref-cpp
  2.        ==============================================================
  3.  
  4. This is a copy of the gcc-2.7.2 pre-processor with some modifications to make
  5. cxref work better.
  6.  
  7. The files are modified in the following way.
  8.  
  9. cccp.c    - Hacked about a bit (the changes are in cccp.c.diff).
  10. cexp.y    - As original.
  11. version.c - As original.
  12. pcp.h     - As original.
  13. config.h  - A simple version that should work in most cases.
  14. tm.h      - A simple version that should work in most cases.
  15.  
  16.  
  17. Configuration
  18. -------------
  19.  
  20. There is a configuration script that should be used to configure cxref-cpp.  Run
  21. 'make configure', only if this fails then you should read further.
  22.  
  23.  
  24. Makefile.cpp
  25. ------------
  26.  
  27. This file contains all of the configuration that is needed to compile the
  28. cxref-cpp program.  The information in this file is generated by the script
  29. config-cpp (make configure).
  30.  
  31. This has a number of variables that are used when compiling cxref-cpp.
  32.  
  33. PREDEFINES              The parameters that cpp has compiled in as defaults.
  34.  
  35. INCLUDE_DIR[123]        The location of the include files.
  36.  
  37. SVR4_STRINGS            Do we need SVR4 string functions.
  38.  
  39. CONFIG_STATUS           The status of the configuration.
  40.  
  41.  
  42. CONFIG_STATUS
  43. -------------
  44.  
  45. This contains the reason for configuration failure. a non-zero string will cause
  46. the Makefile to not build cxref-cpp.
  47.  
  48.  
  49. SVR4_STRINGS
  50. ------------
  51.  
  52. Set to a non-zero value if we need to use the functions memset etc. instead of
  53. bzero etc., typically on SVR4 machines.
  54.  
  55.  
  56. config.h & tm.h
  57. ---------------
  58.  
  59. The files config.h and tm.h that are supplied are trivial.  They only need to
  60. contain a small information about the target system.  This is basically the
  61. number of bits that are used for different data types.
  62.  
  63. If you need to edit either of these files to build cxref-cpp, please tell me how
  64. the machine can be identified (what #defines) and what needs to be changed.
  65.  
  66.  
  67. PREDEFINES and INCLUDE_DIR[123]
  68. -------------------------------
  69.  
  70. [Note that what follows applies to gcc, other compilers may be different]
  71.  
  72. The cxref-cpp program needs to have the same include directories and predefined
  73. macros built in to the program as gcc.  This is so that cxref-cpp and gcc have
  74. the same behaviour when processing the source files.
  75.  
  76. Use `gcc -E -v -dM - < /dev/null' to see the list of include paths and
  77. predefined macros.
  78.  
  79. Those marked `->' below are important.
  80.  
  81.      | Reading specs from /usr/lib/gcc-lib/i486-linux/2.5.8/specs
  82.      | gcc version 2.5.8
  83. C -> |  /usr/lib/gcc-lib/i486-linux/2.5.8/cpp -lang-c -v -undef \
  84.         -D__GNUC__=2 -D__GNUC_MINOR__=5 -Dunix -Di386 -Dlinux -D__unix__ \
  85.         -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -D__i486__ \
  86.         -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386) \
  87.         -dM -
  88.      | GNU CPP version 2.5.8 (80386, BSD syntax)
  89.      | #include "..." search starts here:
  90.      | #include <...> search starts here:
  91. I1-> |  /usr/local/include
  92. I2-> |  /usr/i486-linux/include
  93. I3-> |  /usr/lib/gcc-lib/i486-linux/2.5.8/include
  94.      |  /usr/include
  95.      | End of search list.
  96.      | #define __linux__ 1 
  97.      | #define linux 1 
  98.      | #define __i386__ 1 
  99.      | #define __i386 1 
  100.      | #define __GNUC_MINOR__ 5 
  101.      | #define __i486__ 1 
  102.      | #define i386 1 
  103.      | #define __unix 1 
  104.      | #define __unix__ 1 
  105.      | #define __GNUC__ 2 
  106.      | #define __linux 1 
  107.      | #define unix 1 
  108.  
  109.  
  110. C   The command line that is used when gcc calls cpp.  Notice that it includes
  111.     a number of flags that change the default action of cpp.  (Try doing
  112.     'cpp -v -dM - < /dev/null' to see the difference.)
  113.     Note the -D... and -A... command line flags, the PREDEFINES variable in
  114.     Makefile.cpp needs to be set equal to these.
  115.  
  116. I*  The include files that are built into the cpp program.
  117.     Add these to the makefile as described below:
  118.  
  119.     I1  =>  INCLUDE_DIR1
  120.     I2  =>  INCLUDE_DIR2
  121.     I3  =>  INCLUDE_DIR3
  122.  
  123.  
  124. Testing
  125. -------
  126.  
  127. When cxref-cpp has been made use 'cxref-cpp -v -dM - < /dev/null' and check that
  128. the include directories and predefines are the same as those for gcc by using
  129. 'gcc -E -v -dM - < /dev/null'.
  130.  
  131. If there are differences then it is possible that the cxref-cpp program will
  132. fail even though the source file is legal.
  133.